home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
Aminet
/
game
/
think
/
nim.lha
/
nim
/
nim.doc
< prev
next >
Wrap
Text File
|
1998-10-07
|
1KB
|
43 lines
Nim (FREEWARE)
By Andrew Markwell (andrew.markwell@unn.ac.uk)
Nim is an old game invented bythe Japanese (I think), anyway, basically
there is a pile of matchsticks, 2 players. Each player takes turns in
taking an amount of matchsticks, and the player who removes the last
matchstick is the loser. One player is human, the other the computer.
Here is an example game:
Welcome to the Game
How many matches in pile to start? 10
What is maximum number that may be taken in one go? 5
Who goes first? (Enter (C)omputer or (H)uman and press RETURN) c
The computer has removed 4 sticks.
There are now 6 matchsticks left.
How many sticks do you take? 3
There are now 3 matchsticks left.
The computer has removed 2 sticks.
There are now 1 matchsticks left.
How many sticks do you take? 1
There are now 0 matchsticks left.
The winner is the computer.
It runs front the shell, or any console.
If you're wondering why i'd bother upload such a useless thing, or even write
it :P It's because it was an early C++ assignment, and there was no
other version of Nim on Aminet. Oh - there is also an executable for VMS,
which the uni used to use, but that's obviously not included here :P
=======================================================================
Copyright © 1997-1998 Andrew Markwell
You can email me here: andrew.markwell@unn.ac.uk
or I'm often on The Gathering (telnet: gathering.org.uk 5000)